-
Notifications
You must be signed in to change notification settings - Fork 10
update for use with eink displays, #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d add manual refreshing on new image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me. Haven't tested, but will later today after my magtag arrives.
@jedgarpark is interested in these changes too I believe. |
thankya! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Do you think it'd be clearer to check if the display is an epaper in the constructor and then use if
statements to change behavior? That might be more understandable than catching an exception.
@@ -380,6 +383,8 @@ def advance(self): | |||
) | |||
self._group.append(sprite) | |||
|
|||
if hasattr(self._display, "refresh"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work with a tft? It also has refresh: https://circuitpython.readthedocs.io/en/5.3.x/shared-bindings/displayio/Display.html#displayio.Display.refresh
Shouldn't you be able to call it every time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eink needs a force-refresh, perhaps there are some that dont have refresh? i wasnt sure... i can remove the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can call refresh on all displays. On TFTs it'll just refresh immediately when auto_refresh is on.
Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 1.0.3 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#11 from makermelissa/main > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#10 from makermelissa/main Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.2.0 from 3.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#39 from FoamyGuy/add_magtag_support Updating https://github.com/adafruit/Adafruit_CircuitPython_Slideshow to 1.4.0 from 1.3.1: > Merge pull request adafruit/Adafruit_CircuitPython_Slideshow#26 from ladyada/master
mostly ignore no-backlight-attr and add manual refreshing on new image
test with: